package com.jeesite.modules.isys.keys.mapper;

import com.jeesite.modules.isys.keys.entity.Abnormal;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.lettuce.core.dynamic.annotation.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author XYMTOP
 * @since 2023-11-12
 */
@Repository
public interface AbnormalMapper extends BaseMapper<Abnormal> {

    // 插入异常信息
    int insertAbnormal(Abnormal abnormal);

    // 更新异常信息
    int updateAbnormal(Abnormal abnormal);

    // 删除异常信息
    int deleteAbnormal(String abnormalId);

    // 查询所有异常信息
    List<Abnormal> selectAllAbnormals();

    // 根据异常ID查询异常信息
    Abnormal selectAbnormalById(String abnormalId);

    // 更新异常审核状态
    int updateAbnormalAuditStatus(@Param("abnormalId") String abnormalId, @Param("auditStatus") Integer auditStatus);

    // 查询待审核的异常列表
    List<Abnormal> selectPendingAuditAbnormals();

    // 查询已审核的异常列表
    List<Abnormal> selectReviewedAbnormals();

}
